home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / bbs / adf_142.zip / ADF.TXT < prev    next >
Text File  |  1996-11-03  |  50KB  |  1,249 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                   AnDan Software FOSSIL Version 1.42
  25.  
  26.                   Users Manual
  27.  
  28.                   Scandinavian Digital Systems           AnDan Software FOSSIL Version 1.42                   Users Manual
  29.           ─────────────────────────────────────────────────────────────────
  30.  
  31.  
  32.           Table of contents
  33.  
  34.            1  Overview ...............................................    3
  35.               1.1  Features of ADF ...................................    3
  36.            2  Shareware ..............................................    3
  37.               2.1  Use as shareware ..................................    4
  38.               2.2  How to register ...................................    4
  39.            3  Support and new versions ...............................    5
  40.               3.1  ADF doesn't work ..................................    5
  41.            4  Included files .........................................    6
  42.            5  Installation ...........................................    6
  43.               5.1  Installing on Windows 3.1, 3.11, and WfWG 3.1 .....    7
  44.               5.2  Installing on Windows for Workgroups 3.11 .........    7
  45.               5.3  Installing on Windows 95 ..........................    7
  46.            6  Command line arguments .................................    8
  47.               6.1  port ..............................................    9
  48.               6.2  addr ..............................................    9
  49.               6.2  irq ...............................................    9
  50.               6.4  baud ..............................................    9
  51.               6.5  recbuf,hold,cont ..................................   10
  52.               6.6  trabuf ............................................   10
  53.               6.7  fifo ..............................................   10
  54.               6.8  line ..............................................   11
  55.               6.9  modem .............................................   11
  56.            7  Execution examples .....................................   12
  57.            8  Baud rate calculation ..................................   13
  58.            9  16550, 16650 and 16750 FIFO UARTs ......................   13
  59.               9.1  Receiver 16550-FIFO trigger level .................   14
  60.               9.2  Receiver 16650-FIFO trigger level .................   15
  61.               9.3  Transmitter 16650-FIFO trigger level ..............   15
  62.               9.4  Receiver 16750-FIFO trigger level .................   15
  63.            10 Error messages .........................................   16
  64.            11 The ADFComCh program ...................................   17
  65.            12 The ADFDebug program ...................................   18
  66.               12.1 Using ADFDebug ....................................   18
  67.            13 The ADFTerm program ....................................   19
  68.            14 The ADFTest program ....................................   19
  69.            15 Version history ........................................   20
  70.            16 Future versions ........................................   21
  71.  
  72.  
  73.           Copyright (c) 1994-1996 Scandinavian Digital Systems AB
  74.  
  75.           This product, including the manual and the software, is provided
  76.           as is. Scandinavian Digital Systems AB and Anders Danielsson
  77.           disclaims all warranties of any kind, whether expressed or
  78.           implied, and are not liable to you or anyone else for any damages
  79.           or costs due to the use or inability to use this product.
  80.  
  81.           Acknowledgments:
  82.  
  83.           AnDan Software is a trademark of Scandinavian Digital Systems AB.
  84.           FidoNet is a trademark of Tom Jennings.
  85.           Windows is a trademark of Microsoft Corporation.
  86.  
  87.  
  88.           ─────────────────────────────────────────────────────────────────
  89.           Scandinavian Digital Systems                               Page 2           AnDan Software FOSSIL Version 1.42                   Users Manual
  90.           ─────────────────────────────────────────────────────────────────
  91.  
  92.  
  93.           X00 is a program made by Raymond L. Gwinn.
  94.           BNU is a program made by David Nugent, Unique Computing Pty
  95.           Limited.
  96.           16550 is a device made by National Semiconductor Corporation.
  97.           16650 is a device made by Startech Semiconductor Incorporated.
  98.           16750 is a device made by Texas Instrument Incorporated.
  99.  
  100.  
  101.  
  102.  
  103.           1  Overview
  104.  
  105.           ADF is a FOSSIL revision level 5 driver, including the additional
  106.           functions defined by Raymond L. Gwinn in X00 v1.50.
  107.  
  108.           ADF is specially designed for users of high speed modems with or
  109.           without the 16550, 16650 or the 16750 UART, using DOS or a
  110.           multitasking environment.
  111.  
  112.           ADF was initially written some years ago because other FOSSIL
  113.           drivers did not always work properly in protected mode
  114.           multitasking environments, where the UART is emulated.
  115.  
  116.           ADF is designed to work well with both emulated UARTs and real
  117.           UARTs, without any drawbacks.
  118.  
  119.  
  120.           1.1  Features of ADF
  121.  
  122.           * Always a locked baud-rate.
  123.           * Locked baud-rate of any speed (2 bps - 115200 bps).
  124.           * Defaults to 8 databits, no parity, and 1 stop bit (8N1).
  125.           * Always CTS/RTS handshake. Never DSR/DTR or XON/XOFF handshake.
  126.           * One port per ADF (load ADF in different tasks for many ports).
  127.           * COM-port address configurable (0H-FFFFH).
  128.           * COM-port IRQ configurable (0-15).
  129.           * Full support of the 16550, 16650 and 16750 UARTs.
  130.           * Fills transmit 16550-FIFO buffer with all 16 bytes.
  131.           * Fills transmit 16650-FIFO buffer with all 32 bytes.
  132.           * Fills transmit 16750-FIFO buffer with all 64 bytes.
  133.           * Receiver 16550-FIFO configurable (1, 4, 8 or 14 bytes).
  134.           * Receiver and transmitter 16650-FIFO configurable.
  135.           * Receiver 16750-FIFO configurable.
  136.           * Only 8088/8086 compatible code used.
  137.  
  138.  
  139.           2  Shareware
  140.  
  141.           The files in this package may be copied and distributed if no fee
  142.           is charged, if no changes are done and as no part of other
  143.           products, in purpose to test and evaluate this product for a
  144.           period of 30 days.
  145.  
  146.  
  147.  
  148.  
  149.           ─────────────────────────────────────────────────────────────────
  150.           Scandinavian Digital Systems                               Page 3           AnDan Software FOSSIL Version 1.42                   Users Manual
  151.           ─────────────────────────────────────────────────────────────────
  152.  
  153.  
  154.           2.1  Use as shareware
  155.  
  156.           To use ADF.EXE as shareware, you must first execute the supplied
  157.           REGISTER.EXE and register ADF.EXE as shareware.
  158.  
  159.           Run REGISTER.EXE, specify ADF.EXE as file to register and do not
  160.           enter any user name. ADF.EXE may then be used as shareware.
  161.  
  162.           When ADF.EXE is executed it will display the number of used days
  163.           since it was registered as shareware.
  164.  
  165.  
  166.           2.2  How to register
  167.  
  168.           To register ADF and use it for more than 30 days, you should pay
  169.           an even amount equal to the sum of USD 10 in a currency of your
  170.           own choice. Examples of common currencies:
  171.  
  172.               American Dollars        USD    10
  173.               Austrian Schillings     ATS   100
  174.               Belgian Francs          BEF   300
  175.               British Pounds          GBP     6
  176.               Canadian Dollars        CAD    15
  177.               Dutch Guilders          NLG    15
  178.               French Francs           FRF    50
  179.               German Marks            DEM    15
  180.               Italian Lira            ITL 15000
  181.               Swedish Krona           SEK    60
  182.  
  183.           Please send cash (bills, paper money) in a letter to:
  184.  
  185.               Scandinavian Digital Systems AB
  186.               Billerudsgatan 20
  187.               S-661 30  Saffle
  188.               SWEDEN
  189.  
  190.           Please include a note, a postcard or the printed REGISTER.TXT,
  191.           with your FidoNet or Internet e-mail address, and you will
  192.           receive an e-mail receipt of your payment.
  193.  
  194.           No other methods of payments are accepted. Do not send checks,
  195.           cheques or money orders. Only use paper money, not coins.
  196.  
  197.           After you have sent the money, send an electronic mail through
  198.           FidoNet to Reg at 2:203/620 or through Internet to
  199.           reg@andan.edv.se. The mail should contain the following lines:
  200.  
  201.               Prod: ADF
  202.               User: <Your name and your e-mail address, BBS or location>
  203.  
  204.           You will then receive an automatic reply with your private
  205.           registration code, to the address you mailed your registration.
  206.  
  207.  
  208.  
  209.  
  210.           ─────────────────────────────────────────────────────────────────
  211.           Scandinavian Digital Systems                               Page 4           AnDan Software FOSSIL Version 1.42                   Users Manual
  212.           ─────────────────────────────────────────────────────────────────
  213.  
  214.  
  215.           When you specify your user registration name after the "User:",
  216.           you should use your name together with some kind of address or
  217.           location information. Examples:
  218.  
  219.               User: Anders Danielsson, AnDan BBS, 2:203/620
  220.               User: Charles Smith, cs@someplace.com
  221.               User: Hans Schultz, Dernauer Str., Hamburg, Germany
  222.  
  223.           Use at least 16 characters, but not more than 63 characters.
  224.  
  225.           Registration forms are available at http://www.digsys.se.
  226.  
  227.           You may also phone AnDan BBS at +46-533-13700 and register
  228.           on-line. The on-line registration is similar to the mail
  229.           registration.
  230.  
  231.           Note, Reg is a program, and it will reply to your origin (from or
  232.           reply) address. Please make sure that your e-mail has a valid
  233.           origin address.
  234.  
  235.           Please note, routed FidoNet e-mail may not work on long
  236.           distances.
  237.  
  238.           All FidoNet e-mail replies from Reg (and from the support) are
  239.           routed, but a copy of the mail is also put on hold at 2:203/620.
  240.  
  241.           If you suspect that routed mail will not work, use crash mail to
  242.           send to Reg, and some hours later do a poll for any hold replies.
  243.  
  244.  
  245.           3  Support and new versions
  246.  
  247.           If you have questions, comments or find bugs in the program,
  248.           please send electronic mail to the author, Anders Danielsson at
  249.           FidoNet 2:203/620, ad@digsys.se or ad@andan.edv.se.
  250.  
  251.           Well documented reports of new bugs and suggestions are honored
  252.           with a free registration.
  253.  
  254.           The latest version can be downloaded from http://www.digsys.se,
  255.           or file requested as ADF from FidoNet 2:203/620.
  256.  
  257.           At http://www.digsys.se you find news, programs and support from
  258.           AnDan Software.
  259.  
  260.           You may also phone AnDan BBS at +46-533-13700, where the newest
  261.           versions and other shareware programs from AnDan Software always
  262.           are downloadable for all users.
  263.  
  264.  
  265.           3.1  ADF doesn't work
  266.  
  267.           ADF is tested to work with many programs, also in different
  268.           environments, that use FOSSIL drivers.
  269.  
  270.  
  271.           ─────────────────────────────────────────────────────────────────
  272.           Scandinavian Digital Systems                               Page 5           AnDan Software FOSSIL Version 1.42                   Users Manual
  273.           ─────────────────────────────────────────────────────────────────
  274.  
  275.  
  276.           The author is convinced that ADF will work together with all well
  277.           behaved programs, and if not, it is our intention to make it work
  278.           with those programs as quickly as possible.
  279.  
  280.           However, it is not our policy to make memory or time consuming
  281.           changes in ADF to make it work with badly behaved programs that
  282.           do not use a FOSSIL correctly.
  283.  
  284.  
  285.           4  Included files
  286.  
  287.           You should have received the following files:
  288.  
  289.           File name:    Description:
  290.  
  291.           ADF.TXT       This file
  292.           ADF.EXE       The FOSSIL driver
  293.           ADFCOMCH.EXE  Checks COM-ports
  294.           ADFDEBUG.EXE  FOSSIL debugger
  295.           ADFTERM.EXE   Very small and simple communication program
  296.           ADFTEST.EXE   FOSSIL tester
  297.           ADFCOM1.BAT   Example of use of ADF with COM1
  298.           ADFCOM2.BAT   Example of use of ADF with COM2
  299.           FILE_ID.DIZ   File description
  300.           REGISTER.TXT  Registration form
  301.           REGISTER.EXE  Registration program
  302.  
  303.  
  304.           5  Installation
  305.  
  306.           Just copy ADF.EXE to a directory included in your PATH.
  307.  
  308.           If you are only running DOS, edit your AUTOEXEC.BAT and insert a
  309.           line that loads ADF.
  310.  
  311.           You may insert (or call) one of the files ADFCOM1.BAT or
  312.           ADFCOM2.BAT for quick and easy editing.
  313.  
  314.           If you are using a protected mode multitasking environment, such
  315.           as Windows, load one copy of ADF in each wanted DOS session using
  316.           different ports.
  317.  
  318.           Do not load ADF in AUTOEXEC.BAT. In fact, this applies for all
  319.           FOSSIL drivers, and this is the reason why ADF only uses one port
  320.           per load.
  321.  
  322.           Instead, execute for example MAINBBS.BAT that will call
  323.           RUNBBS.BAT (or whatever filenames you are using). Such a
  324.           MAINBBS.BAT may look like:
  325.  
  326.               @echo off
  327.               prompt $e[0;40;1;31mBBS$e[0;37m $p$g
  328.               path c:\bbs;%path%
  329.               rem do other SET here, like SET FDOPT=NORES or
  330.  
  331.  
  332.           ─────────────────────────────────────────────────────────────────
  333.           Scandinavian Digital Systems                               Page 6           AnDan Software FOSSIL Version 1.42                   Users Manual
  334.           ─────────────────────────────────────────────────────────────────
  335.  
  336.  
  337.               rem SET MCM=C:\MCMAIL
  338.               call adfcom1
  339.               call runbbs
  340.               adf unload
  341.  
  342.           If you are using Windows 3, you may need to set an environment
  343.           size in SYSTEM.INI, example:
  344.  
  345.               [NonWindowsApp]
  346.               CommandEnvSize=1024
  347.  
  348.  
  349.           5.1  Installing on Windows 3.1, 3.11, and WfWG 3.1
  350.  
  351.           To let ADF (and other DOS application) take advantage of the
  352.           FIFO's of the 16550 UART, you need to install a third-party
  353.           communications drivers (such as Turbocom by Pacific Commware and
  354.           KingComm by OTC Corporation), or upgrade to Windows for
  355.           Workgroups 3.11.
  356.  
  357.  
  358.           5.2  Installing on Windows for Workgroups 3.11
  359.  
  360.           Windows for Workgroups 3.11 is the first version of Windows with
  361.           16550 FIFO support for DOS applications. You do not need any
  362.           third-party communications drivers.
  363.  
  364.           Make sure you got a SERIAL.386 dated Feb 17, 1994, or later.
  365.           (Available at http://www.microsoft.com).
  366.  
  367.           Examples of settings in SYSTEM.INI:
  368.  
  369.               [386Enh]
  370.               COM1BASE=03F8
  371.               COM1IRQ=4
  372.               COM1Fifo=1
  373.               COM1TxFifo=1
  374.               COM1RxTrigger=4
  375.               COM2BASE=02F8
  376.               COM2IRQ=3
  377.               COM2Fifo=1
  378.               COM2TxFifo=1
  379.               COM2RxTrigger=4
  380.  
  381.           Set the COM?RxTrigger to the same value as the receiver trigger
  382.           level of ADF (see below).
  383.  
  384.  
  385.           5.3  Installing on Windows 95
  386.  
  387.           If you have an 16550, 16650 or 16750 UART, you need to enable the
  388.           16550 support and configure it in Windows 95.
  389.  
  390.  
  391.  
  392.  
  393.           ─────────────────────────────────────────────────────────────────
  394.           Scandinavian Digital Systems                               Page 7           AnDan Software FOSSIL Version 1.42                   Users Manual
  395.           ─────────────────────────────────────────────────────────────────
  396.  
  397.  
  398.           In the port settings of the modem configuration, enable the
  399.           FIFOs, set the FIFO receiver buffer (1, 4, 8 or 14) to the same
  400.           value as the receiver trigger level of ADF (see below), and set
  401.           the FIFO transmit buffer to the maximum.
  402.  
  403.           A FIFO receiver trigger level of 4 (the second position in
  404.           Windows 95) is a good choice for most users using 38400 bps or
  405.           higher.
  406.  
  407.           In the SYSTEM.INI file, set the Com?Buffer equal to the size of
  408.           the receive buffer of ADF. Example:
  409.  
  410.               [386Enh]
  411.               Com1Buffer=4096
  412.               Com2Buffer=4096
  413.  
  414.  
  415.           6  Command line arguments
  416.  
  417.           When you run ADF without any arguments, it will display the
  418.           following help text (use ADF|MORE for more prompt):
  419.  
  420.           adf port addr irq baud recbuf[,hold[,cont]] trabuf [fifo] [line]
  421.             [modem]
  422.  
  423.           port    FOSSIL port number, 0-126, or COM-port, COM1-COM127.
  424.                   Example: 0 or COM1
  425.           addr    Address in hex of COM-port, 0-FFFF. Example: 3F8
  426.           irq     IRQ number of COM-port, 0-15. Example: 4
  427.           baud    Locked baud-rate, 1-115200. Example: 38400
  428.           recbuf  Size of receive buffer, 256-16384. Example: 4096
  429.           hold    Flow control hold or stop, default 7/8 of recbuf.
  430.                   Example: 3584
  431.           cont    Flow control continue or restart, default 6/8 of recbuf.
  432.                   Example: 3072
  433.           trabuf  Size of transmit buffer, 256-16384. Example: 4096
  434.           fifo    Receiver 16550-FIFO trigger level, 1, 4, 8 or 14.
  435.                   Default: 8
  436.                   Or 16650,rec,tra for setting receiver trigger level 8,
  437.                   16, 24 or 28, and transmitter trigger level 8, 16, 24 or
  438.                   30 on 16650. Example: 16650,16,8
  439.                   Or 16750,rec for setting receiver trigger level 1, 16, 32
  440.                   or 56 on 16750. Example: 16750,32
  441.           line    Line control register. Default: 3
  442.           modem   Modem control register. Default: 11
  443.  
  444.           ADF will stay resident when using the above command line.
  445.  
  446.           adf UNLOAD
  447.  
  448.           ADF will remove itself from memory when using the above command
  449.           line.
  450.  
  451.  
  452.  
  453.  
  454.           ─────────────────────────────────────────────────────────────────
  455.           Scandinavian Digital Systems                               Page 8           AnDan Software FOSSIL Version 1.42                   Users Manual
  456.           ─────────────────────────────────────────────────────────────────
  457.  
  458.  
  459.           adf watch ON|OFF|time
  460.  
  461.           ADF will turn carrier watchdog on or off when using the above
  462.           command line. If a numeric value is used, the time out in seconds
  463.           (10-3600) will be set, this will not turn the watchdog on or off
  464.           (default is 60 seconds).
  465.  
  466.  
  467.           6.1  port
  468.  
  469.           You may specify the FOSSIL port number starting with 0 by using a
  470.           number only, or you may specify the port number starting with 1
  471.           by putting COM before the number, that is 0 = COM1, 1 = COM2 and
  472.           so on. In practice, ADF sets no limits, but your environment may
  473.           limit the number of COM ports.
  474.  
  475.           The FOSSIL port number is only used to check for correct calls by
  476.           application programs. ADF doesn't use this number to access the
  477.           port or anything like that. You always need to specify the
  478.           address and IRQ of the port.
  479.  
  480.  
  481.           6.2  addr
  482.  
  483.           Address in hexadecimal notation of the COM port, see irq.
  484.  
  485.  
  486.           6.3  irq
  487.  
  488.           IRQ of the COM port. The most common addresses and IRQs are:
  489.  
  490.               COM1    3F8    4
  491.               COM2    2F8    3
  492.               COM3    3E8    4
  493.               COM4    2E8    3
  494.  
  495.           Note that you cannot use two COM ports having the same IRQ. If
  496.           you configure your hardware using the same IRQ to two COM ports,
  497.           you must be very sure that they are not used at the same time and
  498.           that programs using them turns them of when finished. Otherwise
  499.           you will get a true electrical short-circuit.
  500.  
  501.  
  502.           6.4  baud
  503.  
  504.           The baud rate to use (lock). Common values are 9600, 19200,
  505.           38400, 56700 and 115200. See chapter 8 for details.
  506.  
  507.           These are the PC standard baud rates. Some communication adapters
  508.           uses a baud rate multiplication, meaning that when ADF sets a PC
  509.           standard baud rate, the true baud rate will be (for example) four
  510.           times higher. ADF fully supports such adapters, you simply
  511.           specify the (false) PC standard baud rate on the ADF command
  512.           line.
  513.  
  514.  
  515.           ─────────────────────────────────────────────────────────────────
  516.           Scandinavian Digital Systems                               Page 9           AnDan Software FOSSIL Version 1.42                   Users Manual
  517.           ─────────────────────────────────────────────────────────────────
  518.  
  519.  
  520.           With some application programs, many modems need to be
  521.           initialized and programmed (e.g. AT&W) using the wanted baud
  522.           rate. The supplied ADFTERM.EXE is useful for one-time
  523.           initialization and programming of modems.
  524.  
  525.           The baud rate should be at least as high as 10 times your cps
  526.           rate. It should not need to be much larger than this.
  527.  
  528.           Be aware of that the RS-232 standard specifies a maximum baud
  529.           rate of 20000 bps. Most of todays computers and modems allows
  530.           higher baud rates, but some don't, please see your hardware
  531.           manuals.
  532.  
  533.  
  534.           6.5  recbuf,hold,cont
  535.  
  536.           The receive buffer size in bytes. Use at least 1024, but it
  537.           should not need to be much larger than your maximum cps rate.
  538.           4096 is a good value for high speed modems.
  539.  
  540.           Optionally, you may use commas and specify the receive flow
  541.           control trigger levels. When the number of bytes in the receive
  542.           buffer is more than the "hold" value, RTS will be lowered. Then
  543.           when the number of bytes has gone below the "cont" value, RTS
  544.           will be raised again.
  545.  
  546.           Note that some modems ignores the RTS signal, in practice it will
  547.           work anyway, at least with large enough receive buffer.
  548.  
  549.  
  550.           6.6  trabuf
  551.  
  552.           The transmit buffer size in bytes. Use at least 1024, but it
  553.           should not need to be much larger than your maximum cps rate.
  554.           4096 is a good value for high speed modems.
  555.  
  556.  
  557.           6.7  fifo
  558.  
  559.           The 16550 FIFO receiver trigger level. A value of 1, 4, 8 or 14
  560.           bytes. Please see chapter 9 for details. If you don't specify
  561.           this on the command line, a trigger level of 8 bytes will be used
  562.           by default. If you don't have a 16550 or compatible, ADF will
  563.           still set the trigger level, but it will have no effect.
  564.  
  565.           When running ADF under Windows, set the receiver trigger level of
  566.           the Windows communication driver to the same value as ADF.
  567.  
  568.           Instead of the 16550 FIFO receiver trigger level, you may specify
  569.           the number 16650 or 16750, meaning you got a 16650 or a 16750
  570.           UART respectively.
  571.  
  572.           When you use 16650 you must also specify the 16650 FIFO receiver
  573.           and transmitter trigger levels separated with commas.
  574.  
  575.  
  576.           ─────────────────────────────────────────────────────────────────
  577.           Scandinavian Digital Systems                              Page 10           AnDan Software FOSSIL Version 1.42                   Users Manual
  578.           ─────────────────────────────────────────────────────────────────
  579.  
  580.  
  581.           When you use 16750 you must also specify the 16750 FIFO receiver
  582.           trigger level separated with a comma.
  583.  
  584.           Please note, you may need or want to use your 16650 or 16750 in
  585.           16550 compatible mode. In such cases, you should not tell ADF to
  586.           use 16650 or 16750.
  587.  
  588.  
  589.           6.8  line
  590.  
  591.           The value to put in the UART's Line Control Register. This is an
  592.           advanced option. If you want 8N1 (like most users) you don't need
  593.           to worry about this option. The Line Control Register is a bit
  594.           register, you need to add the values wanted.
  595.  
  596.           Value:  Meaning:
  597.  
  598.              0    5 data bits
  599.              1    6 data bits
  600.              2    7 data bits
  601.              3    8 data bits
  602.              4    2 stop bits
  603.              8    Parity Enable
  604.             16    Even Parity
  605.             32    Stick Parity
  606.  
  607.           Common combinations:
  608.  
  609.             8N1   3
  610.             7O1   10 (2+8)
  611.             7E1   26 (2+8+16)
  612.  
  613.  
  614.           6.9  modem
  615.  
  616.           The value to put in the UART's Modem Control Register. This is an
  617.           advanced option. If you have a 100% PC compatible you should not
  618.           use this option. The Modem Control Register is a bit register,
  619.           you need to add the values wanted. This value is loaded into the
  620.           register when application programs calls for a FOSSIL
  621.           initialization. Some bits (like DTR, RTS and Out2) are modified
  622.           by ADF during execution.
  623.  
  624.           Value:  Meaning:
  625.  
  626.             1     Data Terminal Ready, DTR
  627.             2     Request to Send, RTS
  628.             4     Out1
  629.             8     Out2, On PC compatibles, the Out2 signal is used to mask
  630.                   the IRQ signal. IRQ must not be masked for ADF to work.
  631.            16     Loopback
  632.            32     16650 only: Open source (emitter) interrupt output, for
  633.                   shared interrupts. (ADF has no special shared interrupt
  634.                   capabilities).
  635.  
  636.  
  637.           ─────────────────────────────────────────────────────────────────
  638.           Scandinavian Digital Systems                              Page 11           AnDan Software FOSSIL Version 1.42                   Users Manual
  639.           ─────────────────────────────────────────────────────────────────
  640.  
  641.  
  642.            64     16650 only: Infrared RXD/TXD
  643.           128     16650 only using 7.372 MHz clock: Divided by four baud
  644.                   clock
  645.  
  646.  
  647.           7  Execution examples
  648.  
  649.           Example of loading ADF using COM1 (see ADFCOM1.BAT):
  650.  
  651.           adf COM1 3F8 4 38400 4096 4096 8
  652.  
  653.  
  654.           Example of loading ADF using COM2 (see ADFCOM2.BAT):
  655.  
  656.           adf COM2 2F8 3 38400 4096 4096 8
  657.  
  658.  
  659.           Example of loading ADF with 16650:
  660.  
  661.           adf COM1 3F8 4 38400 4096 4096 16650,16,8
  662.  
  663.  
  664.           Example of loading ADF with 16750:
  665.  
  666.           adf COM1 3F8 4 38400 4096 4096 16750,32
  667.  
  668.  
  669.           Example of loading ADF with 7E1:
  670.  
  671.           adf COM1 3F8 4 38400 4096 4096 8 26
  672.  
  673.  
  674.           Example of unloading ADF:
  675.  
  676.           adf unload
  677.  
  678.  
  679.           Example of setting the watchdog time out to 2 minutes:
  680.  
  681.           adf watch 120
  682.  
  683.  
  684.           Example of REMOTE.BAT, to execute on DOS-Shell in a BBS:
  685.  
  686.           @echo off
  687.           rem %1 = Baud rate (used to detect local call)
  688.           if not %1@==0@ ctty COM%2
  689.           if not %1@==0@ adf watch on
  690.           command
  691.           adf watch off
  692.           ctty CON
  693.  
  694.           The carrier watchdog will try to reboot the computer after about
  695.           60 seconds (if not changed) from the carrier drops. This may be
  696.  
  697.  
  698.           ─────────────────────────────────────────────────────────────────
  699.           Scandinavian Digital Systems                              Page 12           AnDan Software FOSSIL Version 1.42                   Users Manual
  700.           ─────────────────────────────────────────────────────────────────
  701.  
  702.  
  703.           dangerous, especially in a multitasking environment (such as
  704.           Windows).
  705.  
  706.  
  707.           8  Baud rate calculation
  708.  
  709.           A PC compatible serial port uses the following formula to
  710.           calculate the baud rate:
  711.  
  712.           Baud = 115200 / Divisor
  713.  
  714.           The Divisor is an integer number (whole number), 1 to 65535, used
  715.           to program the serial port (the UART chip). This means that only
  716.           certain baud rates are allowed.
  717.  
  718.  
  719.           Divisor:  Baud rate:    True baud rate on a 4x adapter:
  720.  
  721.              1      115200 bps            460800 bps
  722.              2       57600 bps            230400 bps
  723.              3       38400 bps            153600 bps
  724.              4       28800 bps            115200 bps
  725.              5       23040 bps             92160 bps
  726.              6       19200 bps             76800 bps
  727.              7       16457 bps             65829 bps
  728.              8       14400 bps             57600 bps
  729.              9       12800 bps             51200 bps
  730.             10       11520 bps             46080 bps
  731.             11       10473 bps             41891 bps
  732.             12        9600 bps             38400 bps
  733.              .         .                     .
  734.              .         .                     .
  735.              X       115200/X             460800/X
  736.              .         .                     .
  737.              .         .                     .
  738.  
  739.  
  740.           When you specify a baud rate on the command line to ADF, ADF
  741.           calculates the Divisor and checks that the baud-rate is valid
  742.           (realizable).
  743.  
  744.           If you for example use 76800 bps as a baud rate to ADF, the
  745.           Divisor will be 115200/76800 = 1.5, but this is not an integer
  746.           (whole number) and cannot be set. ADF will in this case display
  747.           an error message.
  748.  
  749.  
  750.           9  16550, 16650 and 16750 FIFO UARTs
  751.  
  752.           ADF has full support of the 16550, the 16650 and the 16750 UART.
  753.           These UARTs are enhanced replacements of the standard 8250 and
  754.           16450 UARTs, using hardware buffers to get higher performance.
  755.  
  756.  
  757.  
  758.  
  759.           ─────────────────────────────────────────────────────────────────
  760.           Scandinavian Digital Systems                              Page 13           AnDan Software FOSSIL Version 1.42                   Users Manual
  761.           ─────────────────────────────────────────────────────────────────
  762.  
  763.  
  764.           These buffers are called FIFO (First In First Out) buffers.
  765.  
  766.           The 16550 has one 16 byte large receiver FIFO buffer, and one 16
  767.           bytes large transmitter FIFO buffer.
  768.  
  769.           The 16650 has one 32 byte large receiver FIFO buffer, and one 32
  770.           bytes large transmitter FIFO buffer.
  771.  
  772.           The 16750 has one 64 byte large receiver FIFO buffer, and one 64
  773.           bytes large transmitter FIFO buffer.
  774.  
  775.           On the 16550 and on the 16750, you may set the trigger level of
  776.           the receiver FIFO buffer. On the 16650, you may set the trigger
  777.           level of both the receiver and transmitter FIFOs.
  778.  
  779.  
  780.           9.1  Receiver 16550-FIFO trigger level
  781.  
  782.           The receiver 16550-FIFO trigger level can be set to 1, 4, 8 or 14
  783.           bytes of it's total 16 bytes buffer size.
  784.  
  785.           The value is the number of bytes in the receiver FIFO buffer that
  786.           will generate an interrupt from the UART to the CPU.
  787.  
  788.           The receiver FIFO buffer and it's trigger level, is the main
  789.           reason why many people replaces their old 8250 and 16450 UARTs
  790.           with 16550.
  791.  
  792.           If you for example use a baud rate of 38400 bps (8N1), there will
  793.           be a new byte received each 260 us (microseconds). With an
  794.           ordinary UART, the CPU must answer to an interrupt from the UART
  795.           each 260 us, and read the byte and store it in memory.
  796.  
  797.           If the CPU is unable to answer an interrupt at this rate, or if
  798.           some program has disable interrupts longer than 260 us, received
  799.           bytes will be lost. If you are downloading a file, you will get a
  800.           lot of resends.
  801.  
  802.           The 16550 UART has a 16 byte receiver FIFO buffer (and also a 16
  803.           byte transmitter FIFO) so it can store up to 16 bytes until the
  804.           CPU must read and empty the buffer.
  805.  
  806.           The receiver FIFO trigger level specifies when an interrupt
  807.           should be generated by the UART to the CPU.
  808.  
  809.           If the trigger level is set to 4, the UART will generate an
  810.           interrupt after 4 bytes have been received, but will still fill
  811.           the buffer up to 16 bytes if the CPU doesn't answer the
  812.           interrupt. The rate of interrupts at 38400 bps will be
  813.           4*260 = 1040 us, and the tolerance to no answer from the CPU will
  814.           be (16-4)*260 = 3120 us.
  815.  
  816.           The most common problem with high baud rates, is that programs
  817.           turns of interrupts during too long time. A trigger level of 14
  818.  
  819.  
  820.           ─────────────────────────────────────────────────────────────────
  821.           Scandinavian Digital Systems                              Page 14           AnDan Software FOSSIL Version 1.42                   Users Manual
  822.           ─────────────────────────────────────────────────────────────────
  823.  
  824.  
  825.           would in most cases not be a good solution, normally a trigger
  826.           level of 8 is good enough, in some cases you may lower it to 4.
  827.           You should not choose a lower trigger level then necessary,
  828.           because it would load the CPU without giving any benefits.
  829.  
  830.  
  831.           9.2  Receiver 16650-FIFO trigger level
  832.  
  833.           The receiver 16650-FIFO trigger level can be set to 8, 16, 24 or
  834.           28 bytes of it's total 32 bytes buffer size.
  835.  
  836.           It's similar to the 16550-FIFO, see section 9.1 above, but it
  837.           will have higher tolerance against CPU response time and it will
  838.           load the CPU even less.
  839.  
  840.  
  841.           9.3  Transmitter 16650-FIFO trigger level
  842.  
  843.           The transmitter 16650-FIFO trigger level can be set to 8, 16, 24
  844.           or 30 bytes of it's total 32 bytes buffer size.
  845.  
  846.           This setting cannot be done on the 16550 or 16750. The 16550 and
  847.           16750 always have theirs transmitter FIFO trigger levels set to 1
  848.           by hardware.
  849.  
  850.           When the number of not yet transmitted bytes in the FIFO goes
  851.           below the trigger level, the UART will generate an interrupt to
  852.           the CPU, so the interrupt service program can fill up the FIFO
  853.           with more characters to transmit.
  854.  
  855.           The setting of the transmitter FIFO trigger level will affect how
  856.           much the transmission will load the CPU, and how fast the
  857.           transmission may be.
  858.  
  859.           A lower trigger level means less CPU load, but maybe lower
  860.           transfer rates if long interrupt response times.
  861.  
  862.           A higher trigger level means higher transfer rates on systems
  863.           with long interrupt response times, but it will load the CPU
  864.           more.
  865.  
  866.  
  867.           9.4  Receiver 16750-FIFO trigger level
  868.  
  869.           The receiver 16750-FIFO trigger level can be set to 1, 16, 32 or
  870.           56 bytes of it's total 64 bytes buffer size.
  871.  
  872.           It's similar to the 16550-FIFO, see section 9.1 above, but it
  873.           will have higher tolerance against CPU response time and it will
  874.           load the CPU even less.
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.           ─────────────────────────────────────────────────────────────────
  882.           Scandinavian Digital Systems                              Page 15           AnDan Software FOSSIL Version 1.42                   Users Manual
  883.           ─────────────────────────────────────────────────────────────────
  884.  
  885.  
  886.           10 Error messages
  887.  
  888.           When ADF displays an error message, it will wait a moment before
  889.           continuing, so you are able to read the message when ADF is
  890.           executed among other programs in batch files (such as
  891.           AUTOEXEC.BAT).
  892.  
  893.           All error messages with explanations:
  894.  
  895.  
  896.           "Argument error (command line error)."
  897.  
  898.           ADF was unable to understand the command line arguments, please
  899.           see section 6 above. This error message will also be displayed if
  900.           numerical values on the command line are out of range.
  901.  
  902.  
  903.           "DOS v3.1 or newer required."
  904.  
  905.           Your DOS is too old, you need to upgrade to a newer DOS version.
  906.  
  907.  
  908.           "Unable to handle TSRs in this environment."
  909.  
  910.           ADF does a check that it can search and find it self in the DOS
  911.           memory (lower or upper). If this fails it will display this
  912.           message. Try using plain DOS without special memory managers or
  913.           program loaders.
  914.  
  915.  
  916.           "Error when releasing memory."
  917.  
  918.           DOS reports error when freeing memory. This can occur during both
  919.           load and unload of ADF. Probably is the DOS memory allocation
  920.           blocks damaged (by some program).
  921.  
  922.  
  923.           "Invalid (not realizable) baud-rate."
  924.  
  925.           The specified baud-rate cannot be used. Please see section 8
  926.           above.
  927.  
  928.  
  929.           "Not enough memory for buffers."
  930.  
  931.           The memory given to ADF by DOS at load time is not enough to
  932.           satisfy the wanted size of the receive and transmit buffers.
  933.           Decrease the sizes or load ADF in low memory or in a larger high
  934.           memory block.
  935.  
  936.  
  937.           "Error when restoring interrupts."
  938.  
  939.  
  940.  
  941.  
  942.           ─────────────────────────────────────────────────────────────────
  943.           Scandinavian Digital Systems                              Page 16           AnDan Software FOSSIL Version 1.42                   Users Manual
  944.           ─────────────────────────────────────────────────────────────────
  945.  
  946.  
  947.           This may occur when unloading ADF. Most common cause is that some
  948.           other programs also are using the same interrupts. Try to unload
  949.           all TSRs in the reverse order of how they where loaded.
  950.  
  951.  
  952.           "ADF already loaded."
  953.  
  954.           This message will be displayed if you try to load ADF a second
  955.           time.
  956.  
  957.  
  958.           "ADF not loaded."
  959.  
  960.           This message will be displayd if you use some of the ADF command
  961.           lines that requires ADF to be loaded as a TSR first (e.g. unload
  962.           and watch).
  963.  
  964.  
  965.           "Please run "REGISTER" first to use this program."
  966.  
  967.           You must run REGISTER.EXE to use ADF.EXE, see section 2 above. If
  968.           you get a new version of ADF.EXE you need to run REGISTER.EXE
  969.           once again.
  970.  
  971.  
  972.           "You have used this program for more than 30 days. If you want to
  973.           use it more, you must register it. Please wait a moment."
  974.  
  975.           Please read section 2 above. ADF will wait a moment (from 5
  976.           seconds up to 60 seconds) when displaying this message, you
  977.           cannot terminate this waiting.
  978.  
  979.  
  980.           11 The ADFComCh program
  981.  
  982.           When you run ADFComCh without any arguments, it will display the
  983.           following help text:
  984.  
  985.           adfcomch addr
  986.  
  987.           addr    Address in hex of COM port, 0-FFFF. Example: 3F8
  988.  
  989.           ADFComCh checks if there is an UART at the specified port
  990.           address. The most common port addresses are:
  991.  
  992.               COM1    3F8
  993.               COM2    2F8
  994.               COM3    3E8
  995.               COM4    2E8
  996.  
  997.           The current UART settings will be cleared or modified. Please run
  998.           from plain DOS only, and reboot or load ADF after usage. Sets
  999.           ERRORLEVEL to:
  1000.  
  1001.  
  1002.  
  1003.           ─────────────────────────────────────────────────────────────────
  1004.           Scandinavian Digital Systems                              Page 17           AnDan Software FOSSIL Version 1.42                   Users Manual
  1005.           ─────────────────────────────────────────────────────────────────
  1006.  
  1007.  
  1008.           255  Error
  1009.             5  No UART
  1010.             4  16450
  1011.             3  16550
  1012.             2  16650
  1013.             1  16750
  1014.  
  1015.  
  1016.           12 The ADFDebug program
  1017.  
  1018.           When you run ADFDebug without any arguments, it will display the
  1019.           following help text:
  1020.  
  1021.           adfdebug command
  1022.  
  1023.           'command' is one of the following commands:
  1024.  
  1025.           L [opt] Load TSR, should be done after the FOSSIL load. Options:
  1026.                   /t    Use time measurement.
  1027.                   /sNN  Use ASCII NN as separator, default is 13 and 10 (CR
  1028.                   and LF).
  1029.           U       Unload TSR, should be done before the FOSSIL unload.
  1030.           N       No output (default at load time).
  1031.           S       Screen output.
  1032.           F file  File output to the specified file.
  1033.  
  1034.  
  1035.           12.1 Using ADFDebug
  1036.  
  1037.           ADFDebug is a FOSSIL debugger. It is loaded as a TSR after the
  1038.           FOSSIL has been loaded, and may write debug (trace) information
  1039.           to the screen or to a file.
  1040.  
  1041.           It is included for application programmers, and for advanced
  1042.           users.
  1043.  
  1044.           ADFDebug is loaded using the command L with or without the
  1045.           options /t or /s. If /t is used, it will do time measurements of
  1046.           the FOSSIL driver functions using timer ticks with the unit
  1047.           0.838095 us (microseconds). The time will always include a small
  1048.           offset error, independent of the FOSSIL driver used. Execution
  1049.           time of interrupts that occurs during FOSSIL execution will be
  1050.           included in the time measurement.
  1051.  
  1052.           When loading with the option /t, ADFDebug may cause the internal
  1053.           DOS clock (BIOS Timer Tick) to be incorrectly updated. Do only
  1054.           use /t in plain DOS without any timer depending TSRs, including
  1055.           hard disk caches (e.g. smartdrv), and reboot when done with
  1056.           testing. During testing, do not hold down keys or move the mouse.
  1057.  
  1058.           After loading ADFDebug, the command S or F is used to start debug
  1059.           output, and the command N is used to stop the output.
  1060.  
  1061.  
  1062.  
  1063.  
  1064.           ─────────────────────────────────────────────────────────────────
  1065.           Scandinavian Digital Systems                              Page 18           AnDan Software FOSSIL Version 1.42                   Users Manual
  1066.           ─────────────────────────────────────────────────────────────────
  1067.  
  1068.  
  1069.           When using the command F, you must also specify a file name. The
  1070.           file is opened, written to and closed at each FOSSIL call, so
  1071.           most programs using the FOSSIL will run very slow. The file may
  1072.           also get very large.
  1073.  
  1074.           ADFDebug uses DOS to write to the file, which may cause a system
  1075.           crash when the FOSSIL is used by some programs (programs that
  1076.           calls the FOSSIL from interrupt routines).
  1077.  
  1078.           For testing purposes the program ADFTest (see below) is included.
  1079.           It calls a lot of FOSSIL functions, and the calls are done
  1080.           immediate after a BIOS Timer Tick count, to minimize time
  1081.           measurement errors.
  1082.  
  1083.           Example of usage of ADFDebug and ADFTest:
  1084.  
  1085.           @echo off
  1086.           del adf.lst
  1087.           adf COM1 3F8 4 38400 2048 1024 8
  1088.           adfdebug L /t /s9
  1089.           adfdebug F adf.lst
  1090.           adftest COM1
  1091.           adfdebug U
  1092.           adf unload
  1093.  
  1094.  
  1095.           13 The ADFTerm program
  1096.  
  1097.           When you run ADFTerm without any arguments, it will display the
  1098.           following help text:
  1099.  
  1100.           adfterm port
  1101.  
  1102.           port    FOSSIL port number, 0-126, or COM-port, COM1-COM127.
  1103.                   Example: 0 or COM1
  1104.  
  1105.           ADFTerm is a very small and simple communication program, that
  1106.           uses the ADF or any FOSSIL driver. It will set 2400 bps and 8N1
  1107.           if FOSSIL is not locked.
  1108.  
  1109.           You may call BBSes and use ANSI-BBS if you have ANSI.SYS loaded.
  1110.  
  1111.  
  1112.           14 The ADFTest program
  1113.  
  1114.           When you run ADFTest without any arguments, it will display the
  1115.           following help text:
  1116.  
  1117.           adftest port
  1118.  
  1119.           port    FOSSIL port number, 0-126, or COM-port, COM1-COM127.
  1120.                   Example: 0 or COM1
  1121.  
  1122.  
  1123.  
  1124.  
  1125.           ─────────────────────────────────────────────────────────────────
  1126.           Scandinavian Digital Systems                              Page 19           AnDan Software FOSSIL Version 1.42                   Users Manual
  1127.           ─────────────────────────────────────────────────────────────────
  1128.  
  1129.  
  1130.           ADFTest is a FOSSIL test program.
  1131.  
  1132.           ADFTest will send "ATE1<cr>" to the port and expect at least one
  1133.           character as reply. A modem connected to the port will in most
  1134.           cases do the job.
  1135.  
  1136.           ADFTest is intended to be used with ADFDebug for testing and
  1137.           verifying FOSSIL drivers.
  1138.  
  1139.  
  1140.           15 Version history
  1141.  
  1142.           v1.10 November 22, 1995
  1143.  
  1144.           This is the first non-BETA version. The setting of the receiver
  1145.           FIFO trigger level on the command line has been added since the
  1146.           v1.00 BETAs from 1994.
  1147.  
  1148.  
  1149.           v1.20 December 9, 1995
  1150.  
  1151.           Many improvements and bug fixes has been done. ADF now includes
  1152.           all FOSSIL functions 01H to 21H as X00 v1.50 does. It also
  1153.           includes function 7EH and 7FH for "external application". ADF
  1154.           will now display an error message if the baud-rate is not
  1155.           realizable. Some more utility programs have been included, the
  1156.           debug function has been moved into a separate program (option /d
  1157.           is no longer valid).
  1158.  
  1159.  
  1160.           v1.30 January 20, 1996
  1161.  
  1162.           Bugfix of External Application. Added output of flag register in
  1163.           ADFDebug. Bugfix of function 1E "Extended line control
  1164.           initialization". Bugfix of function 04, 05, 1C, 14 when used on
  1165.           illegal port number. Only check DL for port number (due to bugs
  1166.           in other programs), valid port range is now 0-126. COM-port
  1167.           number may be used instead of FOSSIL port number.
  1168.  
  1169.  
  1170.           v1.31 January 22, 1996
  1171.  
  1172.           The time limit of 30 days after installation has been removed.
  1173.           ADF will not stop executing after 30 days as before, it will run
  1174.           for ever, even if it is never registered.
  1175.  
  1176.  
  1177.           v1.32 February 9, 1996
  1178.  
  1179.           Bugfix of External Application, such as Video FOSSIL.
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.           ─────────────────────────────────────────────────────────────────
  1187.           Scandinavian Digital Systems                              Page 20           AnDan Software FOSSIL Version 1.42                   Users Manual
  1188.           ─────────────────────────────────────────────────────────────────
  1189.  
  1190.  
  1191.           v1.40 March 23, 1996
  1192.  
  1193.           Bugfix when input buffer was purged the RTS signal was not
  1194.           restored (activated, made high) if it had been lowered due to
  1195.           flow control. Receiver flow control hold and continue levels may
  1196.           now be specified on the command line. Improved block read and
  1197.           write (function 18H and 19H) for higher speed. ADFTest uses ATE1
  1198.           to test block read/write with more characters. User settings of
  1199.           line and modem control registers. Included support for 16650.
  1200.           REGISTER.EXE v1.20 needed to register. Documentation improved.
  1201.  
  1202.  
  1203.           v1.41 July 17, 1996
  1204.  
  1205.           Changed the reboot method. User may specify watchdog time out,
  1206.           default changed to 60 seconds. Documentation improved.
  1207.  
  1208.  
  1209.           v1.42 November 3, 1996
  1210.  
  1211.           The FOSSIL is now always kept alive, it is never actually closed,
  1212.           until ADF is unloaded. Applications, including the DOS devices
  1213.           COM1: and COM2:, that uses the BIOS serial communication
  1214.           functions, will because of this now use the FOSSIL functions when
  1215.           ADF is loaded. AnDan Software is now on the WWW at
  1216.           http://www.digsys.se. The chapter about benchmarks has been
  1217.           removed, because some users misunderstand its purpose. Does not
  1218.           touch 16650 register if not 16650 has been set on command line,
  1219.           else Windows may crash. The internal size of receive and transmit
  1220.           buffers adjusted so the reported sizes will be equal to the sizes
  1221.           on the command line. Due to behavior in Windows 95 when ADF is
  1222.           loaded in AUTOEXEC.BAT (not recommended), the Priority Interrupt
  1223.           Controller enable bits are toggled on initialization calls to the
  1224.           FOSSIL. Included support for 16750. ADFComCh has new ERRORLEVELs.
  1225.  
  1226.  
  1227.           16 Future versions
  1228.  
  1229.           As long as people keep registering and using ADF, we will
  1230.           continue to make new versions, to improve ADF and to support
  1231.           future UARTs and environments to come.
  1232.  
  1233.           On demand from many users, enhanced and fast communication
  1234.           drivers for Windows 95 and OS/2, with support of DOS FOSSIL
  1235.           applications, will probably be developed in the near future.
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.           ─────────────────────────────────────────────────────────────────
  1248.           Scandinavian Digital Systems                              Page 21
  1249.